package nl.han.ica.ap.searchengine.client;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Represents all results from the processing of a single query
 * 
 * @author A.J. Janssen, ...
 * @version 0.1
 *
 */
public class SearchResults 
{
	//Forces the class to maintain a local (shallow) copy of the result pages list.
	private final List<ResultPage> pages  = new ArrayList<ResultPage>();
	
	public SearchResults()
	{
		
	}
	
	public SearchResults(List<ResultPage> pages)
	{
		this.pages.addAll(pages);
	}
	
	public List<ResultPage> getPages(){
		return Collections.unmodifiableList(pages);
	}

	public void addPage(ResultPage page) {
		pages.add(page);
	}
}
